package com.ceair.flight.refund.location.dt.enums;

public class RefundResConst {
	public static String RESULT_NULL_CODE = "AIR_REFUND_0001";
	public static String RESULT_NULL_MSG = "查询无可退航段！";
	public static String POLICY_CODE = "AIR_REFUND_0002";
	public static String POLICY_MSG = "航段不符合退票政策！";
	public static String INIT_EMPTY_CODE = "AIR_REFUND_0003";
	public static String INIT_EMPTY_MSG = "初始化链表为空 ！";
	public static String FLT_ORD_NOT_EXIST_CODE = "AIR_REFUND_0004";
	public static String FLT_ORD_NOT_EXIST_MSG = "航班订单不存在！";
	public static String ARG_NOT_EXIST_CODE = "AIR_REFUND_0005";
	public static String ARG_NOT_EXIST_MSG = "参数缺失！";
	public static String ILL_STATE_CODE = "AIR_REFUND_0006";
	public static String ILL_STATE_MSG = "非法状态！";
	public static String UPDATE_FAIL_CODE = "AIR_REFUND_0007";
	public static String UPDATE_FAIL_MSG = "数据库更新失败！";
	public static String INSERT_FAIL_CODE = "AIR_REFUND_0008";
	public static String INSERT_FAIL_MSG = "数据库插入失败！";
	public static String FIND_FAIL_CODE = "AIR_REFUND_0009";
	public static String FIND_FAIL_MSG = "数据库更新失败！";
	public static String FIND_EMPTY_CODE = "AIR_REFUND_0010";
	public static String FIND_EMPTY_MSG = "查询为空！";
	public static String FIRST_AUDIT_FAIL_CODE = "AIR_REFUND_0011";
	public static String FIRST_AUDIT_FAIL_MSG = "一审失败:";
	public static String SECOND_AUDIT_FAIL_CODE = "AIR_REFUND_0012";
	public static String SECOND_AUDIT_FAIL_MSG = "二审失败:";
	public static String SECOND_PASS_ABNORMAL_CODE = "AIR_REFUND_0013";
	public static String SECOND_PASS_ABNORMAL_MSG = "二审通过异常的退票记录:";
	public static String SECOND_REFUSE_ABNORMAL_CODE = "AIR_REFUND_0014";
	public static String SECOND_REFUSE_ABNORMAL_MSG = "二审拒绝异常的退票记录:";
	
	public static String OTHER_REASON_CODE = "REFUND_9999";
	public static String OTHER_REASON_MSG = "其他原因：";
	public static Integer MSG_EXCEPTION_START = 0;
	public static Integer MSG_EXCEPTION_SIZE = 100;
	

	public static String AIRREFUND_NULL_CODE ="AIRREFUND_1001";
	public static String AIRREFUND_NULL_MSG ="查询退票详情失败";
	
	public static String AIRREFUNDAPPLY_NULL_CODE ="AIRREFUND_1002";
	public static String AIRREFUNDAPPLY_NULL_MSG ="查询退票失败";
	
	public static String AIR_FIR_APPLY_NULL_CODE ="AIRREFUND_1003";
	public static String AIR_FIR_APPLY_NULL_MSG ="查询一审列表失败";
	
	public static String AIR_SEC_APPLY_NULL_CODE="AIRREFUND_1004";
	public static String AIR_SEC_APPLY_NULL_MSG="查询一审列表失败";
	
	public static String AIRAPPLY_NULL_CODE = "AIRREFUND_1005";
	public static String AIRAPPLY_NULL_MSG ="查询退票信息失败";
	
	public static String AIRAPPLY_LIST_CODE ="AIRREFUND_1006";
	public static String AIRAPPLY_LIST_MSG ="查询申请单列表失败";

	
	public static String getExceptionMsg(String exceptionMsg,String msg){
		StringBuffer exceptionMsgBuffer = new StringBuffer();
		exceptionMsgBuffer.append(msg);
		if(exceptionMsg != null && !"".equals(exceptionMsg)){
			if(exceptionMsg.length() > 100 + MSG_EXCEPTION_START){
				exceptionMsgBuffer.append(exceptionMsg.substring(MSG_EXCEPTION_START,MSG_EXCEPTION_SIZE));
			}else{
				exceptionMsgBuffer.append(exceptionMsg);
			}
		}
		return exceptionMsgBuffer.toString();
	}
}
